﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using AuctionHelper.Core;
using AuctionHelper.Entity;

namespace AuctionHelper.Business
{
    /// <summary>
    /// 程序初始化业务类
    /// </summary>
    public class PrepareBLL
    {
        public static Result<bool> Init()
        {
            var result = new Result<bool>();
            var config = XmlHelper.DeSerialize<Config>();
            if (WindowHelper.GetWindow(config.WindowName))
            {
                WindowHelper.ActiveWindow();
                result.Data = true;
            }
            else
            {
                result.Data = false;
                result.Message = "目标程序没有运行！";
            }
            return result;
        }
    }
}
